local weizhenzu = fk.CreateSkill {
  name = "qunxian3__liangzi_weizhenzu",
}

Fk:loadTranslationTable {
  ["qunxian3__liangzi_weizhenzu"] = "味真足",
  ["$qunxian3__liangzi_weizhenzu1"] = "瞅着像水，喝着甜嘴，真带劲，味真足！",
  ["$qunxian3__liangzi_weizhenzu2"] = "该吃吃该喝喝，遇事别往心里搁。",
  ["$qunxian3__liangzi_weizhenzu3"] = "焖子，味真足！",
  [":qunxian3__liangzi_weizhenzu"] = "出牌阶段，你可以弃置一张手牌，视为使用一张无次数限制的牌名中包含【<a href='qunxian3__liangzi_weizhenzu_food_jieshao'>食物</a>】的牌。",
  ["qunxian3__liangzi_weizhenzu_food_jieshao"] = "<br><b>#食物</b><br>【顺手牵羊】、【桃】、【酒】、【桃园结义】、【五谷丰登】、【兵粮寸断】",
  ["#qunxian3__liangzi_weizhenzu"] = "味真足：你可以弃置一张手牌，视为使用一张无次数限制的牌名中包含“食物”的牌"
}

weizhenzu:addEffect("viewas", {
  anim_type = "special",
  card_filter = function(self, player, to_select, selected, selected_targets)
    return #selected == 0 and table.contains(player:getHandlyIds(), to_select)
  end,
  interaction = function(self, player)
    local allName = { "snatch", "peach", "amazing_grace", "god_salvation", "analeptic", "supply_shortage" }
    local canNames = table.filter(allName, function(cname, index, array)
      return player:canUse(Fk:cloneCard(cname))
    end)
    return UI.CardNameBox { choices = canNames, all_choices = allName }
  end,
  card_num = 1,
  prompt = "#qunxian3__liangzi_weizhenzu",
  view_as = function(self, player, cards)
    if #cards ~= 1 or self.interaction == nil or self.interaction.data == nil then return end
    local card = Fk:cloneCard(self.interaction.data)
    card.skillName = "qunxian3__liangzi_weizhenzu"
    card:addFakeSubcards(cards)
    return card
  end,
  before_use = function(self, player, use)
    use.extraUse = true
    player.room:throwCard(use.card.fake_subcards, "qunxian3__liangzi_weizhenzu", player, player)
  end,
  enabled_at_play = function(self, player)
    return player.phase == Player.Play
  end,
  enabled_at_response = Util.FalseFunc
})

return weizhenzu
